<?php
class Morder extends CI_Model{
	protected $_table="tpt_order";
	protected $_tableDetail="tpt_order_detail";
	public function __construct(){
		parent::__construct();	
		$this->load->database();
	}
	
	public function insert($data){
        $this->db->insert($this->_table,$data);
    }
	
	public function insertDetail($data){
        $this->db->insert($this->_tableDetail,$data);
    }

    public function update($data,$id){
        $this->db->where('order_id',$id);
        $this->db->update($this->_table,$data);
    }

}